cmake_minimum_required(VERSION 3.0)

project(APPLE)

find_package(PkgConfig REQUIRED)
pkg_check_modules(LAPACKE REQUIRED lapacke)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 

#default compiler
SET(CMAKE_C_COMPILER "/usr/bin/gcc") 
SET(CMAKE_CXX_COMPILER "/usr/bin/g++") 

add_executable(testlapcke_cmake testlapcke.cpp)
target_link_libraries(testlapcke_cmake lapacke)